﻿using Xtensive.Orm;

namespace CustomFieldMapping.Model
{
    /*
     * To control how a column will be named, use [FieldMapping] attribute
     */
    [HierarchyRoot]
    public class Book : Entity
    {
        [Field, Key]
        public int Id { get; set; }

        [Field]
        [FieldMapping("BookTitle")]
        public string Title { get; set; }

        [Field]
        [FieldMapping("BookAuthor")]
        public string Author { get; set; }

        public Book(Session session) :
            base(session) {}
    }
}